HA$PBExportHeader$u_cst_tabmantocabedet.sru
forward
global type u_cst_tabmantocabedet from u_cst_tabpage
end type
type uo_powerdock from u_cst_powerdock_v1 within u_cst_tabmantocabedet
end type
type sle_buscar from singlelineedit within u_cst_tabmantocabedet
end type
type ddlb_1 from dropdownlistbox within u_cst_tabmantocabedet
end type
type uo_toolbarstrip from u_cst_toolbarstrip within u_cst_tabmantocabedet
end type
type shl_1 from statichyperlink within u_cst_tabmantocabedet
end type
end forward

global type u_cst_tabmantocabedet from u_cst_tabpage
integer width = 3099
integer height = 2384
event ue_addtab ( string as_titulo,  string as_icono )
event ue_nuevo ( )
event ue_ver_object ( boolean ab_ver )
event ue_editar ( )
event ue_copy_fila ( datawindow ad_dw,  integer ai_row,  integer ai_sw )
event type long ue_getdwmodified ( )
event type string ue_getbutton ( )
event type integer ue_grabar ( )
event type integer ue_verificar_modified ( string as_tipo )
event type integer ue_validar ( )
event ue_setbutton ( string as_button )
event ue_set_ib_sw ( boolean ab_sw )
event ue_copy_fila_det ( datawindow ad_dw,  integer ai_row,  integer ai_sw )
event ue_bloquear_dwdet ( )
event ue_setrow ( integer ai_row )
event ue_parametros ( )
event ue_cambio_opc ( string as_button )
uo_powerdock uo_powerdock
sle_buscar sle_buscar
ddlb_1 ddlb_1
uo_toolbarstrip uo_toolbarstrip
shl_1 shl_1
end type
global u_cst_tabmantocabedet u_cst_tabmantocabedet

type variables

s_parm  istr_parm
datastore ids_datastore ,ids_sysmenutool
boolean ib_sw = false
long ii_tabindex,il_index ,ll_tabmanto ,ll_dwmodified=0
integer ii_idmenu,ii_sw
string is_button
//user secundarios
//u_cst_mle uo_mle

u_cst_grillamain iuo_gridmain
userobject iuo_user[]
userobject iuo_dwgrid 

Window iw_parent
string is_grilla,is_tab2, is_idToolBar, is_idmenu,is_entidad,isTabSecu , is_tituloSecu,is_rutaIcoSecu,is_uoDwGrid ,is_uoTitulo,is_uoImg ,is_columna,isa_columna[]

end variables

forward prototypes
public function integer of_getwindow ()
public subroutine of_cargar_columnas (datawindow adw)
public subroutine of_seterror (long al_error)
end prototypes

event ue_addtab(string as_titulo, string as_icono);
//istr_parm.auo_userobject=this
uo_PowerDock.of_OpenDocument   ( iuo_user[ll_tabmanto ] , istr_parm,as_titulo,as_icono,is_tab2,false)
uo_PowerDock.of_ActivateDocument(iuo_user[ll_tabmanto])
istr_parm.auo_userobject=iuo_user[ll_tabmanto ]
//iuo_user[ll_tabmanto ]
//uo_PowerDock.of_displayclosebuttonintab( false)
end event

event ue_nuevo();iuo_user[ll_tabmanto ].EVENT DYNAMIC 	ue_nuevo()
end event

event ue_ver_object(boolean ab_ver);iuo_user[ll_tabmanto ].EVENT DYNAMIC 	ue_ver_object(ab_ver)
end event

event ue_editar();iuo_user[ll_tabmanto ].EVENT DYNAMIC 	ue_nuevo()
end event

event ue_copy_fila(datawindow ad_dw, integer ai_row, integer ai_sw);ii_sw = ai_sw
ib_sw = false
iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_copy_fila(ad_dw,ai_row,ai_sw)
end event

event type long ue_getdwmodified();ll_dwmodified = iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_getdwmodified()
return ll_dwmodified
end event

event type string ue_getbutton();//is_button = 
return is_button
end event

event type integer ue_grabar();return iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_grabar()
end event

event type integer ue_verificar_modified(string as_tipo);integer  ll_opc

if isnull(is_entidad) then is_entidad =''

if as_tipo = 'C' then //esto es cuando se intenta cerrar
	choose case  upper(is_button)
		case 'NUEVO','EDITAR'
			ll_opc = f_msg('Cambio no guardados ... $$HEX1$$bf00$$ENDHEX$$Esta seguro que desea cerrar ?',6) 
			choose case ll_opc
				case 3 //es cuando cancelas
					return 3
				case 2 //aqui es cuando no grabas y sales
					return 2
					//iuo_tabmantomain.event dynamic ue_nuevo()
					//iuo_grillamain.event dynamic ue_dw_enabled(true)//activa para no poder modificar 
				case 1 //aqui grabas y sales
					return 1 
			end choose		
		end choose
Else
		choose case  upper(is_button)
		case 'NUEVO','EDITAR'
			
			ll_opc = f_msg('$$HEX1$$bf00$$ENDHEX$$Estas editando '+upper(is_entidad)+' . $$HEX1$$bf00$$ENDHEX$$Quieres guardar los cambios?',5) 
			choose case ll_opc
				case 3 //es cuando cancelas
					return 3
				case 2 //aqui es cuando no grabas y sales
					return 2
					//iuo_tabmantomain.event dynamic ue_nuevo()
					//iuo_grillamain.event dynamic ue_dw_enabled(true)//activa para no poder modificar 
				case 1 //aqui grabas y sales
					if  Event ue_grabar() = 0 then return 3
						//iuo_dwgrid.event post ue_refrescar_row (dw_1,0,is_button)	
					return 2
			end choose		
		end choose 
	
end if
return 3 
end event

event type integer ue_validar();long li_verificar

if event ue_getdwmodified() >0 and ib_sw = true  then
	li_verificar = event ue_verificar_modified('C') 
	choose case  li_verificar
		case 1
			return 0
		case 2 
			return 1
	end choose
else
	return 0
end if
return 0
end event

event ue_setbutton(string as_button);is_button = as_button
end event

event ue_set_ib_sw(boolean ab_sw);ib_sw = ab_sw
end event

event ue_copy_fila_det(datawindow ad_dw, integer ai_row, integer ai_sw);ii_sw = ai_sw
ib_sw = false
iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_copy_fila_det(ad_dw,ai_row,ai_sw)
end event

event ue_bloquear_dwdet();string lk
iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_bloquear_dwdet()
end event

event ue_setrow(integer ai_row);iuo_user[ll_tabmanto ].EVENT DYNAMIC ue_setrow(ai_row)
end event

event ue_parametros();iuo_user[ll_tabmanto ].EVENT DYNAMIC 	ue_parametros()


end event

event ue_cambio_opc(string as_button);iuo_user[ll_tabmanto ].EVENT DYNAMIC 	ue_cambio_opc(as_button)
end event

public function integer of_getwindow (); PowerObject	lpo_parent
Window lw_window

// loop thru parents until a window is found
lpo_parent = GetParent()
Do While lpo_parent.TypeOf() <> Window! and IsValid(lpo_parent)
	lpo_parent = lpo_parent.GetParent()
Loop

// set return to the window or null if not found
If IsValid (lpo_parent) Then
	lw_window = lpo_parent
Else
	SetNull(lw_window)
End If

iw_parent = lw_window

RETURN 1
end function

public subroutine of_cargar_columnas (datawindow adw);ddlb_1.reset( )
string ls_syntax, ls_cadena, ls_temp 
long ld_pos, ld_pos_ini, ld_pos_fin
Integer li_fila
ls_syntax = adw.Describe("DataWindow.Syntax")
/* Recupera el nombre de las columnas */
ld_pos = 1
ls_cadena = ''
li_fila =1
Do While ld_pos > 0
	
	ld_pos = pos(ls_syntax, 'text', ld_pos)
	If ld_pos > 0 Then
		ld_pos_ini = pos(ls_syntax, 'name=', ld_pos)
		ld_pos_fin = pos(ls_syntax, ' ', ld_pos_ini)
		ls_temp = ls_cadena +' '+ mid(ls_syntax, ld_pos_ini+5, ld_pos_fin - ld_pos_ini - 5 )
		If Right(ls_temp, 2)='_t' Then 	
//			li_fila = dw_1.InsertRow(0)
		
//			dw_1.Object.Columna_name[li_fila] = Trim(Left(ls_temp, Len(ls_temp)-2))
			isa_columna[li_fila]= Trim(Left(ls_temp, Len(ls_temp)-2))
//			ddlb_1.additem(Trim(Left(ls_temp, Len(ls_temp)-2)))	

			//-- las etiquetas
			ld_pos_ini = pos(ls_syntax, 'text="', ld_pos_fin)
			ld_pos_fin = pos(ls_syntax, '"', ld_pos_ini+7)
			
//			dw_1.Object.Columna_text[li_fila] = Trim(mid(ls_syntax, ld_pos_ini+6, ld_pos_fin - ld_pos_ini -6))
			ddlb_1.additem(Trim(mid(ls_syntax, ld_pos_ini+6, ld_pos_fin - ld_pos_ini -6)))
			li_fila ++
		End If
			
		ld_pos = ld_pos_fin
	End If
Loop
ddlb_1.selectitem( 1)
ddlb_1.event selectionchanged(1)
Return


end subroutine

public subroutine of_seterror (long al_error);
iuo_user[ll_tabmanto ].function DYNAMIC of_seterror(al_error)
end subroutine

on u_cst_tabmantocabedet.create
int iCurrent
call super::create
this.uo_powerdock=create uo_powerdock
this.sle_buscar=create sle_buscar
this.ddlb_1=create ddlb_1
this.uo_toolbarstrip=create uo_toolbarstrip
this.shl_1=create shl_1
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.uo_powerdock
this.Control[iCurrent+2]=this.sle_buscar
this.Control[iCurrent+3]=this.ddlb_1
this.Control[iCurrent+4]=this.uo_toolbarstrip
this.Control[iCurrent+5]=this.shl_1
end on

on u_cst_tabmantocabedet.destroy
call super::destroy
destroy(this.uo_powerdock)
destroy(this.sle_buscar)
destroy(this.ddlb_1)
destroy(this.uo_toolbarstrip)
destroy(this.shl_1)
end on

event resize;call super::resize;//uo_treeview.Height = this.Height
//DW_1.Height = this.Height
//
//if st_border.visible= false then
	uo_PowerDock.Resize( this.width, this.height - (uo_toolbarstrip.height  ))
//	uo_PowerDock.Move(4, st_border.height )
//else
//	uo_PowerDock.Resize( this.width, this.height - (uo_toolbarstrip.height + 12))
//   uo_PowerDock.Move(4,uo_toolbarstrip.height + 12 + st_border.Height)
//end if

uo_toolbarstrip.Width =(this.width - 12) 
//st_border.Width =(this.width - 12) 

end event

event ue_postconstructor;call super::ue_postconstructor;long ll_image

uo_PowerDock.of_SetDock(uo_PowerDock.LEFT, TRUE)
//uo_PowerDock.of_SetDock(uo_PowerDock.RIGHT, TRUE)
uo_PowerDock.of_SetDockSize(uo_PowerDock.LEFT, 1200)
//uo_PowerDock.of_SetDockSize(uo_PowerDock.RIGHT, 1500)
//uo_PowerDock.of_SetDockSize(uo_PowerDock.TOP, 500)
//uo_PowerDock.of_SetDockSize(uo_PowerDock.BOTTOM, 500)
//ll_image = uo_PowerDock.of_AddImage(is_rutaIcoSecu)//C:\PBGUIControls105\globe.ico
//uo_PowerDock.of_opentab(iuo_user[ii_tabindex ],istr_parm,is_tituloSecu  ,isTabSecu,ll_image)
//AGREGAR USEROBJECT DATAWINDOWS PARA REALIZAR MANTENIMIENTO DE TABLAS MAESTRAS
istr_parm.auo_toolbarstrip = uo_toolbarstrip
istr_parm.auo_tabmantocabedet = this
//uo_PowerDock.of_AddDockItem(uo_PowerDock.LEFT, uo_gridmain,'',istr_parm, "Listado ", 'EditDataGrid!')
if is_grilla = '' or isnull(is_grilla) then 
	f_msj('Falta configurar el datawindows en el modulo deCONFIGURACION DEL SISTEMA',4)
	//uo_PowerDock.of_closedocument( uo_PowerDock.of_getactiveobject( ))
	return
end if

uo_PowerDock.of_AddDockItem(uo_PowerDock.LEFT, iuo_dwgrid,'u_cst_grillamaincabedet',istr_parm, "Listado ", 'EditDataGrid!')
//uo_PowerDock.of_AddDockItem(uo_PowerDock.LEFT, iuo_gridmain, "Listado ", 'EditDataGrid!')

istr_parm.auo_grillamaincabedet =iuo_dwgrid
istr_parm.auo_powerdock = uo_powerdock 
istr_parm.as_button = 'Consultar'
istr_parm.as_parm[1] =''
//uo_toolbarstrip.event POST ue_buttonclicked ('CONSULTAR')
//
ll_tabmanto ++
event post  ue_addtab('Principal','SetDefaultClass!')

//uo_PowerDock.of_AddDockItem(uo_PowerDock.LEFT, iuo_dwgrid , is_uoDwGrid, istr_parm, is_uoTitulo , is_uoImg)
//uo_PowerDock.of_OpenDocument(iw_windowtest2, 'Window','Window!')
//uo_PowerDock.of_OpenDocument( uo_w, istr_parm,'Nuevo User','new!','n_prueba')
//uo_PowerDock.of_OpenDocument( uo_w,  'Window','Window!')
//uo_PowerDock.of_AddDockItem(uo_PowerDock.RIGHT, uo_xplistbar , is_uoDwGrid, istr_parm, is_uoTitulo , is_uoImg)




end event

event constructor;call super::constructor;//aqui es cuando se crea el obejto
//recibe los parametros 
istr_parm = message.powerobjectparm 

ids_datastore  =  istr_parm.ads_menu  //aqui recibe el datastore del menu seleccionado
is_idmenu       =  ids_datastore.object.Idmenu[1]
is_idToolBar    =  ids_datastore.object.idToolBar[1]
is_tab2   		    =  ids_datastore.object.tTab2[1]
is_grilla 		    =  ids_datastore.object.tDwGrid[1]
is_entidad       =   ids_datastore.object.tEntidad[1]
of_getwindow()


end event

type uo_powerdock from u_cst_powerdock_v1 within u_cst_tabmantocabedet
integer y = 108
integer width = 782
integer height = 1896
integer taborder = 50
end type

on uo_powerdock.destroy
call u_cst_powerdock_v1::destroy
end on

event ue_tabclosed;//integer li_integer
//li_integer = event ue_verificar_modified('C')
//if li_integer = 3  then return
////f_msj('tabcloseds',4)
end event

type sle_buscar from singlelineedit within u_cst_tabmantocabedet
event enchange pbm_enchange
boolean visible = false
integer x = 9
integer y = 4
integer width = 471
integer height = 92
integer taborder = 40
integer textsize = -8
integer weight = 400
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

event enchange;string ls
iuo_dwgrid.Dynamic of_filtrar(this.text,is_columna)
//THIS.Text,is_columna

//uo_toolbar.DYNAMIC post event ue_cargar_columnas(dw_1)

end event

type ddlb_1 from dropdownlistbox within u_cst_tabmantocabedet
boolean visible = false
integer x = 562
integer y = 4
integer width = 590
integer height = 400
integer taborder = 20
integer textsize = -8
integer weight = 400
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
boolean sorted = false
boolean vscrollbar = true
string item[] = {"ENERO","FEBRERO"}
borderstyle borderstyle = stylelowered!
end type

event selectionchanged;is_columna = isa_columna[index] //this.text(index)
sle_buscar.text=''
sle_buscar.setfocus( )

end event

type uo_toolbarstrip from u_cst_toolbarstrip within u_cst_tabmantocabedet
event ue_cargar_columnas ( datawindow adw )
integer width = 3077
integer taborder = 20
boolean border = true
end type

event ue_cargar_columnas(datawindow adw);
//s_param_cols ls_struc
//ls_struc = dr
//////ls_struc = Message.PowerObjectParm
//ddlb_1.additem(ls_struc.col1)
//ddlb_1.additem(ls_struc.col2)
//ddlb_1.additem(ls_struc.col3)
//ddlb_1.additem(ls_struc.col4)
//ddlb_1.additem(ls_struc.col5)
ddlb_1.reset( )
string ls_syntax, ls_cadena, ls_temp
long ld_pos, ld_pos_ini, ld_pos_fin
Integer li_fila
ls_syntax = adw.Describe("DataWindow.Syntax")

/* Recupera el nombre de las columnas */
ld_pos = 1
ls_cadena = ''
li_fila =1
Do While ld_pos > 0
	ld_pos = pos(ls_syntax, 'text', ld_pos)
	If ld_pos > 0 Then
		ld_pos_ini = pos(ls_syntax, 'name=', ld_pos)
		ld_pos_fin = pos(ls_syntax, ' ', ld_pos_ini)
		ls_temp = ls_cadena +' '+ mid(ls_syntax, ld_pos_ini+5, ld_pos_fin - ld_pos_ini - 5 )
		If Right(ls_temp, 2)='_t' Then 	
//			li_fila = dw_1.InsertRow(0)
		
//			dw_1.Object.Columna_name[li_fila] = Trim(Left(ls_temp, Len(ls_temp)-2))
			isa_columna[li_fila]= Trim(Left(ls_temp, Len(ls_temp)-2))
//			ddlb_1.additem(Trim(Left(ls_temp, Len(ls_temp)-2)))	

			//-- las etiquetas
			ld_pos_ini = pos(ls_syntax, 'text="', ld_pos_fin)
			ld_pos_fin = pos(ls_syntax, '"', ld_pos_ini+7)
			
//			dw_1.Object.Columna_text[li_fila] = Trim(mid(ls_syntax, ld_pos_ini+6, ld_pos_fin - ld_pos_ini -6))
			ddlb_1.additem(Trim(mid(ls_syntax, ld_pos_ini+6, ld_pos_fin - ld_pos_ini -6)))
			li_fila ++
		End If
			
		ld_pos = ld_pos_fin
	End If
Loop
ddlb_1.selectitem( 1)
ddlb_1.event selectionchanged(1)
Return


end event

on uo_toolbarstrip.destroy
call u_cst_toolbarstrip::destroy
end on

event constructor;call super::constructor;string ls_dtool,ls_rutaicono,ls_tiptext,ls_tipobject
integer li_fila,li_visible,li_enabled

ids_sysmenutool = Create DataStore
//ids_sysmenutool.DataObject = "d_accmusermtoolbarbutton"
//ids_sysmenutool.DataObject = "d_mtoolbarbutton_id"
ids_sysmenutool.DataObject = "d_macceso_menu_button"
ids_sysmenutool.settransobject( sqlca)
ids_sysmenutool.retrieve( is_idToolBar,gs_iduser,is_idmenu)

if ids_sysmenutool.rowcount() > 0 then
	for li_fila = 1 to  ids_sysmenutool.rowcount() 
		ls_tipobject=	 ids_sysmenutool.object.tTipo [li_fila]
		ls_dtool = ids_sysmenutool.object.tDesc[li_fila]
		li_visible  =1// ids_sysmenutool.object.bvisible[li_fila]
		li_enabled  =1// ids_sysmenutool.object.benabled[li_fila]
		ls_rutaicono =''
		ls_rutaicono=  ids_sysmenutool.object.timg[li_fila]
		if left(trim(ls_rutaicono),1)='\' then ls_rutaicono=  gs_unidad+ids_sysmenutool.object.timg[li_fila]
		ls_tiptext = ids_sysmenutool.object.tTipText[li_fila]
		
		if li_visible =1 then
			if ls_tipobject = 'S' then //esto es si va a poner un separador
				  this.of_AddSeparator() ; continue
			end if
			if ls_tipobject = 'D' then 
				if li_enabled = 1 then
					ddlb_1.enabled=true
				else
					ddlb_1.enabled=false
				end if
				ddlb_1.visible = true
				this.of_AddObject(ls_dtool, ddlb_1) ;
				continue
			end if
			
			if ls_tipobject = 'T' then 
					if li_enabled = 1 then
						sle_buscar.visible=true
						sle_buscar.enabled=true
					else
						sle_buscar.visible=false
						sle_buscar.enabled=false
					end if
				sle_buscar.enabled=true
				this.of_AddObject(ls_dtool, sle_buscar) 
				continue
			end if
						
			if ls_tiptext = '' or isnull(ls_tiptext) then ls_tiptext = ls_dtool
			this.of_AddItem(ls_dtool,ls_rutaicono, ls_tiptext)
			if li_enabled=1 then
				this.of_SetEnabled(ls_dtool,true)
			else
				this.of_SetEnabled(ls_dtool,false)
			end if
		end if
	next
end if

//shl_1.visible=true
//shl_1.enabled=true
//this.of_AddObject('Ayuda', shl_1)
//THIS.of_SetSize(THIS.S)
this.of_DisplayText(true)


end event

event ue_buttonclicked;call super::ue_buttonclicked;String ls_file,ls_titulo,ls_userobject,ls_rutaMain
Int li_return , al_index 
long ll_data,ll_count,ll_index,ll_item,ll_report
SetNull(ls_file)
//il_menu =   istr_parm.ll_menu
//il_index  =  uo_1.of_getselectedtab( )
il_index  =uo_PowerDock.of_getdocumentcount( )
istr_parm.as_button = as_button
istr_parm.as_parm[1] =''
is_button = as_button
CHOOSE CASE Upper(as_button)
		CASE 'ACTUALIZAR'
			//EVENT ue_actualizar()
			iuo_dwgrid.event dynamic ue_actualizar()
		
		
		CASE 'NUEVO'
			event ue_nuevo( )
			
			iuo_dwgrid.event dynamic ue_activa_opc(true)
			ib_sw = true
			//uo_powerdock.of_setdocumenttext( iuo_user[ll_tabmanto ],'Nuevo')
		
//		CASE 'SIGUIENTE'
//			iuo_dwgrid.DYNAMIC of_siguiente()
//		CASE 'ANTERIOR'	
//			iuo_dwgrid.DYNAMIC of_anterior() 
//		CASE 'PRIMERO'	
//			iuo_dwgrid.DYNAMIC of_primero() 
//		CASE 'ULTIMO'	
//			iuo_dwgrid.DYNAMIC of_ultimo() 			
////	case 'GENERAR'	
////		if il_index >  0 then ll_report  =   il_report [il_index]
////		iuo_user[il_index ].DYNAMIC of_generar(ll_report )	
		case 'PARAMETROS'
			event  ue_parametros()
//////		if il_index  = 0   then
//////			parent.event ue_postconstructor( )
//////		else
////			istruc_param_report.ll_menu  = il_menu
////			istruc_param_report.uo_control  = uo_1
//////			istruc_param_report.uo_report  = parent
////			//OpenWithParm(w_paramreport,istruc_param_report )
////
//////			iuo_user[il_index ].DYNAMIC of_parametro ( il_menu,uo_1,parent )	
//////		end if
////	case 'ORDENAR'
////		iuo_user[il_index ].DYNAMIC of_ordenar()	
////	case 'PREVIEW'
////		ib_preview = NOT ib_preview
////		IF ib_preview THEN
////			iuo_user[il_index ].EVENT DYNAMIC ue_preview(1)
////		ELSE
////		     iuo_user[il_index ].EVENT DYNAMIC ue_preview(2 )
////		END IF
////	case 'IMPRIMIR'
////	   	iuo_user[il_index ].triggerevent( 'ue_imprimir' )
////	case 'SIGUIENTE'
////		iuo_user[il_index ].triggerevent( 'ue_siguiente' )
////	case 'ANTERIOR'
////		iuo_user[il_index ].triggerevent( 'ue_anterior' )		
////	case 'PRIMERO'
////		iuo_user[il_index ].triggerevent( 'ue_primero' )
////	case 'ULTIMO'
////		iuo_user[il_index ].triggerevent( 'ue_ultimo' )	
////	case 'ZOOM-OUT'
////		iuo_user[il_index ].triggerevent( 'ue_zoommenos' )
////
////	case 'ZOOM-IN'
////		iuo_user[il_index ].triggerevent( 'ue_zoommas')
//	case 'CERRAR'
//		uo_PowerDock.of_closedocument( uo_PowerDock.of_getactiveobject( ))
////	case 'BUSCAR'	
//////		tab_1.tabpage_1.uo_1.of_Find()
////		iuo_user[il_index ].DYNAMIC of_Find()
//////		iuo_user.DYNAMIC of_cargar_columnas()
////	case 'CANCELAR'
////		li_return =	iuo_user[il_index ].EVENT DYNAMIC ue_cancelar()
////		if li_return = -1 then return 
////		iou_powerdock.of_closedocument( iou_powerdock.of_getactiveobject( ))
////	CASE 'REFRESCAR'
//////		iuo_userObject
//////		if il_index = 0  then return
////		iuo_user[il_index].triggerevent( 'ue_refrescar')
//	CASE 'GRABAR'
//	//	li_return =	iuo_user[il_index ].EVENT DYNAMIC ue_grabar()
////		if li_return = -1 then return 
//		//uo_powerdock.of_closedocument( uo_powerdock.of_getactiveobject( ))
//
////	CASE 'BORRAR'
////		li_return =	iuo_user[il_index ].EVENT DYNAMIC ue_borrar()
////		if li_return = -1 then return 
//////		iuo_user.triggerevent( 'ue_borrar')
//////		ll_data =iuo_user.EVENT DYNAMIC ue_borrar()
//////		if li_return = -1 then return 
//////	    	iuo_user.triggerevent( 'ue_refrescar')

//	CASE 'REPORTES'
//		ii_tabindex++
//		ids_store   = create datastore
//		gnv_menu  = create nvo_menu	
//		gnv_menu.of_getUserObject(ids_store,il_menu)
////		messagebox('',string(il_menu))
//		ls_userobject = ids_store.object.cTabMain[1]
//		ls_rutaMain = ids_store.object.cRutaIcoMain[1] 
//		ls_titulo ='Report ' + ids_store.object.cTituloMain[1]
//	  
//		gstruc_param.as_rutaicosecu=ids_store.object.cRutaIcoSecu[1]
//		gstruc_param.as_tituloSecu='Reporte-' //ids_store.object.cTituloSecu[1]
//		gstruc_param.as_dw=ids_store.object.CTabSecuDw[1]  //'d_sysmenu'	
//		gstruc_param.as_dw2=ids_store.object.CTabSecuDw2[1]
//		gstruc_param.as_dw3=ids_store.object.CTabSecuDw3[1]
//		gstruc_param.as_tipomantodw=ids_store.object.CTipomantoDw[1]
////		if ids_store.object.CTipomantoDw[1] = '2' then
//		    gstruc_param.as_tabsecu=ids_store.object.cTabSecuReport[1]
////		else
////			gstruc_param.as_tabsecu=ids_store.object.cTabSecuManto[1]
////		end if
//		gstruc_param.as_dwReport = ids_store.object.cTabSecuReportDw[1]
//		gstruc_param.as_tiptab='R'
//		gstruc_param.as_opc='1' //nuevo
//		  gstruc_param.ll_menu = 	il_menu 
////		gstruc_param.ado_powerdock=uo_PowerDock
//		
//		iou_powerdock.of_opendocument( iuo_userObject[ii_tabindex],gstruc_param,ls_titulo ,ls_rutaMain,ls_userobject)
//		iou_powerdock.of_ActivateDocument(iuo_userObject[ii_tabindex])	


//		dw_2.Print()
//	CASE 'PREVIEW'
//		ib_preview = NOT ib_preview
//		IF ib_preview THEN
//			dw_2.Modify('Datawindow.Print.Preview=yes')
//		ELSE
//			dw_2.Modify('Datawindow.Print.Preview=no')
//		END IF
//	CASE 'CUT'
//		dw_2.Cut()
//	CASE 'COPY'
//		dw_2.Copy()
//	CASE 'PASTE'
//		dw_2.Paste()
//
//	CASE 'PRIOR ROW'
//		dw_2.SelectRow(0,FALSE)
//		dw_2.SetRow(dw_2.GetRow() - 1)
//		dw_2.SelectRow(dw_2.GetRow(), TRUE)
//		dw_2.ScrollToRow(dw_2.GetRow())
//	CASE 'FIRST ROW'
//		dw_2.SelectRow(0,FALSE)
//		dw_2.SetRow(1)
//		dw_2.SelectRow(1, TRUE)
//		dw_2.ScrollToRow(1)
//	CASE 'NEXT ROW'
//		dw_2.SelectRow(0,FALSE)
//		dw_2.SetRow(dw_2.GetRow() + 1)
//		dw_2.SelectRow(dw_2.GetRow(), TRUE)
//		dw_2.ScrollToRow(dw_2.GetRow())
//	CASE 'LAST ROW'
//		dw_2.SelectRow(0,FALSE)
//		dw_2.SetRow(dw_2.RowCount())
//		dw_2.SelectRow(dw_2.RowCount(), TRUE)
//		dw_2.ScrollToRow(dw_2.RowCount())
END CHOOSE
end event

type shl_1 from statichyperlink within u_cst_tabmantocabedet
boolean visible = false
integer x = 2482
integer y = 20
integer width = 475
integer height = 68
boolean bringtotop = true
integer textsize = -10
integer weight = 700
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
boolean underline = true
string pointer = "HyperLink!"
long textcolor = 134217856
string text = "Ayuda"
alignment alignment = center!
boolean focusrectangle = false
end type

